<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      //   const obj = {name:'jack'};
      //   obj.__proto__ = { a: 1 };
      //   Object.definePropertis('',{})
      /*
        create创建对象，同时设置对象原型和属性
      */
      const obj = Object.create(
        { a: 1 },
        {
          name: { value: "jack", writable: true },
        }
      );
      console.log(obj);
    </script>
  </body>
</html>
